#!/usr/bin/python
from pylab import *

def create_subplots(row, col, **kwargs):
    fig, axs = subplots(row, col, **kwargs)
    all_ax = []
    for axs_row in axs:
        for ax in axs_row:
            all_ax.append(ax)
    return (fig, all_ax)





if __name__ == "__main__":
    fig, all_ax = create_subplots(3,5, sharex=True, sharey=True)
    all_ax[0].set_xlim(0,300)
    all_ax[0].set_ylim(0,300)
    for i,ax in enumerate(all_ax):
        ax.plot(linspace(0,300,10), rand(10)*300)
        ax.text(150,150,str(i))

    show()
 
